package cn.itcast.erp.controller;

import cn.itcast.erp.annotation.CheckPower;
import cn.itcast.erp.entity.Storealert;
import cn.itcast.erp.entity.Storedetail;
import cn.itcast.erp.entity.Storeoper;
import cn.itcast.erp.entity.utils.AjaxResult;
import cn.itcast.erp.service.CStoreDetailService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 库存Controller类
 * @author 丛平
 * @date 2019/6/11
 */

@RestController
@RequestMapping("/storeDetail")
public class CStoreDetailController {

    @Resource(name = "storeDetailService")
    private CStoreDetailService cStoreDetailService;



    //查询库存
    @CheckPower("库存查询")
    @RequestMapping("/find")
    public AjaxResult findStoreDetail(Storedetail storedetail){
        return cStoreDetailService.findStoreDetail (storedetail);
    }


    //库存预警
    @CheckPower("库存预警")
    @RequestMapping("/alert")
    public AjaxResult findStorealert(Storealert storealert){
        return cStoreDetailService.findStorealert (storealert);
    }



}
